/*!
 * \file jxbankagree_header.h
 *
 * \brief JXBANKAGREE消息头操作
 *
 * All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.
 *
 * \version 1.0
 * \author songbb
 * \date 2017/04/20
 *
 */

#ifndef __JXBANKAGREE_HEADER_H_
#define __JXBANKAGREE_HEADER_H_

#include "jxbankagree_core.h"

/*!
 * 根据通用包头判断协议
 *
 * \param p_payload         (数据内容)
 * \param ui_payload_len    (数据长度)
 *
 * \return 0  失败\n
 *         1  成功
 *
 */
int jxbankagree_header_detect(char *p_payload
                    , unsigned int ui_payload_len);

/*!
 * 解析通用包头
 *
 * \param p_payload             (数据内容)
 * \param ui_payload_len        (数据长度)
 * \param p_st_jxbankagree_header       (通用头结构体)
 *
 * \return 0  失败\n
 *         1  成功
 *
 */
int jxbankagree_header_unpack(char *p_payload
                    , unsigned int ui_payload_len
                    , Jxbankagree_header *p_st_jxbankagree_header);

#endif
